#include <stdio.h>
#include "square.h"
#include "shape.h"
#include "panel.h"

void drawSquare(Shape *self, void *panel) {
    Square *square = (Square *)self;
    Panel *p = (Panel *)panel;
    int x = square->base.x;
    int y = square->base.y;
    int size = square->size;
    char ch = square->base.ch;

    for (int i = 0; i < size; i++) {
        for (int j = 0; j < size; j++) {
            if (i == 0 || i == size - 1 || j == 0 || j == size - 1) {
                drawPixel(p, x + j, y + i, ch);
            }
        }
    }
}

